<!--conf
<sample>
              <product version="1.4" edition="pro"/>
                     <modifications>
                            <modified date="070101"/>
                     </modifications>
               </sample>
 --> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>Columns' hiding using header menu</title>
	<link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxgrid.css">
	<link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxgrid_skins.css">
	<script  src="../../codebase/dhtmlxcommon.js"></script>
	<script  src="../../codebase/dhtmlxgrid.js"></script>
	<script  src="../../codebase/ext/dhtmlxgrid_hmenu.js"></script>
	<script  src="../../codebase/dhtmlxgridcell.js"></script>	
	
</head>
<style>
   	.dhx_header_cmenu{
			background-color:#ffffff;
			border:2px outset silver;
			z-index:2;
		}
	.dhx_header_cmenu_item{
		white-space:nowrap;
	}		

</style>
<body>
<link rel='STYLESHEET' type='text/css' href='../common/style.css'>
<table cellspacing="0" cellpadding="0" class="sample_header" border="0">
	<tr valign="middle">
		<!-- COMPONENT ICON -->
		<td width="40" align="center"><img src="../common/dhtmlxgrid_icon.gif" border="0"></td>
		<!-- COMPONENT NAME -->
		<td width="150" align="left" nowrap="true">Sample: dhtmlxGrid</td>
		<!-- SAMPLE TITLE -->
		<td width="0" align="left" nowrap><b>Columns' hiding using header menu</b></td>
		<!-- LINK TO COMPONENT PAGE -->
		<td width="0" align="right"><a href="http://www.dhtmlx.com/docs/products/dhtmlxGrid/index.shtml">dhtmlxGrid main page</a></td>
		<!-- CLOSE BUTTON -->
		<td width="50"><div class="sample_close"><a href="javascript:void(0);" onclick="self.close();"><img src="../common/sample_close.gif" width="14" height="14" border="0" alt="X"></a></div></td>
	</tr>
</table>
	<h1 style="margin-top:0px">Columns' hiding using header menu</h1>
	<p>Try to right click on header. And you will see the menu where columns' can be hidden by check</p>
	<table width="600px">
		<tr>
			<td>
				<div id="gridbox" width="100%" height="250px" style="background-color:white;"></div>
			</td>
		</tr>
		
	</table>
<div class='sample_code'><div class="hl-main"><pre><span class="hl-code"> 
 
    </span><span class="hl-comment">//</span><span class="hl-comment">enable header menu with checkboxes for hide/show columns</span><span class="hl-comment"></span><span class="hl-code">
              </span><span class="hl-identifier">mygrid</span><span class="hl-code">.</span><span class="hl-identifier">enableHeaderMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;</span></pre></div></div>

<script>
	mygrid = new dhtmlXGridObject('gridbox');
	mygrid.setImagePath("../../codebase/imgs/");
	mygrid.setHeader("Sales,Book Title,Author,Price,In Store,Shipping,Bestseller,Date of Publication");
	mygrid.setInitWidths("50,150,100,80,80,80,80,200")
	mygrid.setColAlign("right,left,left,right,center,left,center,center")
	mygrid.setColTypes("dyn,edtxt,ed,price,ch,co,ra,ro");
	mygrid.init();
	mygrid.setSkin("modern")
	mygrid.enableHeaderMenu();
	mygrid.setColumnHidden(2,true);
	mygrid.loadXML("grid.xml");
</script>

<!-- FOOTER -->
<table callspacing="0" cellpadding="0" border="0" class="sample_footer"><tr><td style="padding-left: 8px;">&copy; <a href="http://www.dhtmlx.com">DHTMLX LTD</a>. All rights reserved</td></tr></table>
<!-- FOOTER -->

</body>
</html>
